package com.smart.community.gateway.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

/**
 * WebClient配置类
 * 用于网关调用其他微服务
 * 
 * @author Wu.Liang
 * @since 2025-01-30
 */
@Configuration
public class WebClientConfig {

    /**
     * 配置WebClient.Builder
     * 支持负载均衡和服务发现
     */
    @Bean
    @LoadBalanced
    public WebClient.Builder webClientBuilder() {
        return WebClient.builder();
    }
} 